package com.xiao.springes.mapper;

import com.xiao.springes.model.BookBean;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;


/**
 * book Mapper
 *
 * @author xiaoting
 */
public interface BookMapper extends ElasticsearchRepository<BookBean, String> {

    /**
     * 查询作者的书籍
     *
     * @param author 作者名称
     * @return
     */
    List<BookBean> findByAuthor(String author);

    /**
     * 根据标题查询数据
     *
     * @param title 标题
     * @return
     */
    List<BookBean> findByTitle(String title);

}
